<%= header %>
<%= boomerangSnippet %>
<script src="./12-clearResourceTiming.js"></script>
<script src="../../vendor/resourcetiming-compression/src/resourcetiming-decompression.js" type="text/javascript"></script>
<script>
BOOMR_test.init({
	autorun: false,
	testAfterOnBeacon: true,
	ResourceTiming: {
		enabled: true,
		monitorClearResourceTimings: true
	},
	onBoomerangLoaded: function() {
		if (BOOMR_test.isResourceTimingSupported()) {
			var where = document.getElementsByTagName("script")[0].parentNode;
			var script = document.createElement("script");
			script.src = "./support/one.js";

			script.addEventListener("load", function() {
				window.performance.clearResourceTimings();

				script = document.createElement("script");
				script.src = "./support/two.js";

				script.addEventListener("load", function() {
					window.performance.clearResourceTimings();

					BOOMR.page_ready();
				});

				where.appendChild(script);
			});

			where.appendChild(script);
		}
		else {
			BOOMR.page_ready();
		}
	}
});
</script>
<%= footer %>
